contained within this file is all the data and code used to calculate satistics and generate graphs for the journal artical titled 
Development and optimisation of rapid analysis of weathered slag using portable XRF N.H. Marsay1, S.T. Wagland1, P. Campo Moreno1, M.C. Alamar
And the first tecnical chapter of N.H. Marsay PhD thesis 

Apendix: containes summery tabels of the dataset as well as the code used to generate them
Arcive: containes graphs tabels etc that did not make it in to the final manuscrips 
Combining for analysis: containes the full, filterd and and other modifided datasets
filterd_data.csv within this file was used for the generaton of all data graphs and tabels
Fig_B through to Fig_J are figures within the manuscript. 
where a file name contains final it will have been modified by hand to add final tweeks such as ledgends

Sample_matrixes.csv is the key for which sample locationn showed soil or slag matrixes. 

if you wish to use this code you must first change the working director setwd() to the correct dirrectory for your computer (see r files)
